package com.example.springDemo.mapper;

import com.example.springDemo.bean.UserLong;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Options;
import org.apache.ibatis.annotations.Param;

@Mapper//表示它是一个Mapper文件
public interface UserMapper {

    public UserLong getUserLong(Long id);

    @Insert("insert into user_long(username,password) values (#{username},#{password})")
    @Options(useGeneratedKeys = true,keyProperty = "id")//配置
    public boolean insertUserLong(UserLong userLong);
}
